<?php
$IDUserOnline = elgg_get_logged_in_user_guid();  // Dung cho viec tag friend
$myfriends = get_user_friends($IDUserOnline);



if (isset($myfriends)) {
    echo "<ul>";
    foreach ($myfriends as $friend) {
        $name = $friend->getName();
        $id = $friend->getID();
        ?>

        <li>
            <div  id="usertag" > 

                <ul>
                    <li> <input type="checkbox" name="<?php echo $id; ?>" value="<?php echo $id; ?>" /></li>
                    <li> <img src="<?php echo $friend->getIconURL('small'); ?>" alt="User Image" > </li>
                    <li>  <?php echo $name; ?></li>
                </ul>
            </div>
        </li>




        <?php
    }
    echo "</ul>";
    ?>
    <input style="float:right" type="submit" name="tagFriend" value="Save" class="elgg-button elgg-button-submit"/>
    <?php
} else {
    echo "Thôi rồi Lượm ơi";
}
